package com.gm.census.model.pojo;

import javax.persistence.Id;
import javax.validation.constraints.NotNull;

import org.codehaus.jackson.annotate.JsonIgnore;

import com.gm.census.annotations.validation.OneOf;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.NotSaved;
import com.googlecode.objectify.annotation.Parent;

@OneOf(propeties = { "name", "street", "country", "homephone", "workphone",
		"cellphone", "notes" })
public class Entry {

	@Id
	private Long id;
	private String name;
	private String street;
	private String district;
	private String city;
	private Long number;
	private String complement;
	private String country;
	private Boolean commercial;

	@NotSaved
	private String homephone;
	@NotSaved
	private String workphone;
	@NotSaved
	private String cellphone;
	@NotSaved
	private String[] emails;
	@NotSaved
	private String[] notes = new String[10];
	private Boolean confirmed = false;

	@Parent
	@JsonIgnore
	private Key<String> parent;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String[] getEmails() {
		return emails;
	}

	public void setEmails(String[] emails) {
		this.emails = emails;
	}

	public Boolean getCommercial() {
		return commercial;
	}

	public void setCommercial(Boolean commercial) {
		this.commercial = commercial;
	}

	public String getHomephone() {
		return homephone;
	}

	public void setHomephone(String homephone) {
		this.homephone = homephone;
	}

	public String getWorkphone() {
		return workphone;
	}

	public void setWorkphone(String workphone) {
		this.workphone = workphone;
	}

	public String getCellphone() {
		return cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public Long getNumber() {
		return number;
	}

	public void setNumber(Long number) {
		this.number = number;
	}

	public String getComplement() {
		return complement;
	}

	public void setComplement(String complement) {
		this.complement = complement;
	}

	public String[] getNotes() {
		return notes;
	}

	public void setNotes(String[] notes) {
		this.notes = notes;
	}

	public Boolean getConfirmed() {
		return confirmed;
	}

	public void setConfirmed(Boolean confirmed) {
		this.confirmed = confirmed;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Key<String> getParent() {
		return parent;
	}

	public void setParent(Key<String> parent) {
		this.parent = parent;
	}

}
